package com.java.array;

import java.util.Arrays;

public class ArraysTest {

    public static void main(String[] args) {
        int[] array = {43,63,25,88,31};
        //排序
        Arrays.sort(array);
        //二分查找
        int pos = Arrays.binarySearch(array,25);
        for (int n : array) {
            System.out.println(n);
        }
        //判断两个数组是否相同
        boolean b = Arrays.equals(array,new int[]{25,31,45,63,88});
        System.out.println("pos=" + pos);
        System.out.println("b=" + b);
    }
}
